package com.ailk.cuc.autotestbg.xml.utils;

import com.ailk.cuc.autotestbg.common.utils.DateUtils;

public class EssEcsUtils {
	private static Long essRandomNum = new Long(100000l);
	public static String getEssRandomNum() {

		synchronized (essRandomNum) {

			if (essRandomNum.longValue() + 1 > 999999) {
				essRandomNum = new Long(100000l);
				return "100000";
			} else {
				essRandomNum = new Long(essRandomNum.longValue() + 1);
				return Long.toString((essRandomNum.longValue() + 1));
			}
		}
	}

	public static String getEssTransId() {

		return DateUtils.getNowDate() + getEssRandomNum();
	}

	public static String getEssProcId() {

		return DateUtils.getNow2YMDHH() + getEssRandomNum();
	}

	public static String getEssTransIDO() {

		return DateUtils.getNow2YMDHH() + getEssRandomNum();
	}

	public static String getEssProcTime() {

		return DateUtils.getNowDate();
	}
}
